<template>
  <Card>
      <div>
        项目已开始<span style="font-size:xx-large"> {{days}} </span>天
      </div>
      <!-- <div>
        距离下一个里程碑还有<span style="font-size:xx-large"> {{nextMileStone}} </span>天
      </div> -->
      <div>
        大家已累计投入<span style="font-size:xx-large"> {{totalHours}} </span>人时
      </div>
    </Card>
</template>

<script>
import moment from 'moment';
var today = moment(Date.now());

export default {
  props:{
    project: {
      type: Object,
      default:{}
    }
  },
  computed: {
    days: function(){
      return today.diff(moment(this.project.begin),'days');
    },
    nextMileStone: function(){
      return moment(this.project.nextMileStone).diff(today,'days');
    },
    totalHours: function(){
      return this.project.totalHours;
    }
  }
}
</script>

